import { createRouter, createWebHistory } from 'vue-router'

const router = createRouter({
  history: createWebHistory(),
  routes: [
    {
      path: '/',
      redirect: '/home'
    },
    {
      path: '/home',
      name: 'home',
      component: () => import('@/views/home/home.vue'),
      redirect: '/home-layout',
      children: [
        {
          path: '/home-layout',
          name: 'home-layout',
          component: () => import('@/views/home/home-layout.vue')
        },
        {
          path: '/home-action',
          name: 'home-action',
          component: () => import('@/views/home/home-action.vue')
        }
      ]
    },
    {
      path: '/editor',
      name: 'editor',
      component: () => import('@/views/editor/editor.vue')
    }
  ]
})

export default router
